﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace XmlDSigEx
{
    class DereferencerProvider:IDereferencerProvider
    {
        public bool CanHandle(string uri)
        {
            return (uri != null);
        }

        public IUriDereferencer GetDereferencer(string uri)
        {
            if(uri.StartsWith("#") || uri == string.Empty)
                return new SameDocumentDereferencer();
            else
                return new WebRequestDereferencer();
        }
    }
}
